#-*- coding: utf8 -*-
from tutor.scripts import *
from tutor.plugins.maple import *

# variáveis úteis
half = M('1/2')
t = M.t
_i, _j, _k = M('_i, _j, _k')
rr = M('`..`')
coeff = M.coeff

with display_block('Entradas'):
    a = M(oneof(-2, -1, -1, 1, 2, 3, 4))
    b = M(oneof(-2, -1, 1, 2, 3, 4))
    c = M(oneof(2, 3, 4))
    B = fieldB = a * cos(z + c * t) * _i + \
                 b * sin(z + c * t) * _j

with display_block('Resultados'):
    campoE = -b * sin(z + c * t) / c * _i + a * cos(z + c * t) / c * _j
    campoES = -campoE
    integral = -b * cos(z + c * t) * _i - a * sin(z + c * t) * _j
    divI = -a * sin(z + c * t) * _i + b * cos(z + c * t) * _j
    div = a * cos(z + c * t) / c * _i + b * sin(z + c * t) / c * _j
    distr = -oneof(integral, divI, div)

    assert len(set([campoE, campoES, integral, divI, div, distr])) == 6
